home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2000 February / Macworld (2000-02).dmg / Shareware World / Utilities / Business / Ch-Ching 2.6.7r5 / store / includes / nav.lasso < prev    next >
Text File  |  1999-08-09  |  2KB  |  28 lines

  1. <!-- begin category indexing -->
  2.  
  3. [var_set:'last_cat'='']
  4. [var_set:'catIndex'=0]
  5. [var_set:'subcatIndex'=0]
  6. [inline: database=(var:'dtb'), layout='www_categories', show]
  7.     [value_list:'fileCategoryList']
  8.         [var_set:'catIndex'=(Math_add:(var:'catIndex'), 1)]
  9.         [var_set:(String_Concatenate:'category', (var:'catIndex')) = (valuelistitem)]
  10.     [/value_list]
  11.     [value_list:'prodSubCatIndex']
  12.         [if:(var:'last_cat') != (string_getfield:field_number=1, delimiter='%', (valuelistitem))]
  13.             [var_set:'subcatIndex'=0]
  14.             [var_set:(String_Concatenate:(string_getfield:field_number=1, delimiter='%', (valuelistitem)), 'subcat', (Math_add:(var:'subcatIndex'), 1)) = (string_getfield:field_number=2, delimiter='%', (valuelistitem))]
  15.             [var_set:'last_cat'=(string_getfield:field_number=1, delimiter='%', (valuelistitem))]
  16.             [var_set:(String_Concatenate:(string_getfield:field_number=1, delimiter='%', (valuelistitem)), 'Index') = (Math_add:(var:(String_Concatenate:(string_getfield:field_number=1, delimiter='%', (valuelistitem)), 'Index')), 1)]
  17.             [var_set:'subcatIndex'=(Math_add:(var:'subcatIndex'), 1)]
  18.         [else]
  19.             [var_set:(String_Concatenate:(string_getfield:field_number=1, delimiter='%', (valuelistitem)), 'subcat', (Math_add:(var:'subcatIndex'), 1)) = (string_getfield:field_number=2, delimiter='%', (valuelistitem))]
  20.             [var_set:'subcatIndex'=(Math_add:(var:'subcatIndex'), 1)]
  21.             [var_set:(String_Concatenate:(string_getfield:field_number=1, delimiter='%', (valuelistitem)), 'Index') = (Math_add:(var:(String_Concatenate:(string_getfield:field_number=1, delimiter='%', (valuelistitem)), 'Index')), 1)]
  22.             [var_set:'last_cat'=(string_getfield:field_number=1, delimiter='%', (valuelistitem))]
  23.         [/if]        
  24.     [/value_list]
  25. [/inline]
  26.  
  27. <!-- end category indexing -->
  28.